Modeling animal contests based on spatio-temporal dynamics

We present a general theoretical model for the spatio-temporal dynamics of animal contests. Inspired by interactions between physical particles, the model is formulated in terms of effective interaction potentials, which map typical elements of contest behaviour into empirically verifiable rules of contestant motion. This allows us to simulate the observable dynamics of contests in various realistic scenarios, notably in dyadic contests over a localized resource. Assessment strategies previously formulated in game-theoretic models, as well as the effects of fighting costs, can be described as variations in our model's parameters. Furthermore, the trends of contest duration associated with these assessment strategies can be derived and understood within the model. Detailed description of the contestants' motion enables the exploration of spatio-temporal properties of asymmetric contests, such as the emergence of chase dynamics. Overall, our framework aims to bridge the growing gap between empirical capabilities and theory in this widespread aspect of animal behaviour.


INTRODUCTION
Contests over limited resources are a common feature of animal behaviour, and have been the focus of many empirical and theoretical works over the past decades [1]. Due to the cost and benefit trade-offs that they entail, and following the foundations laid by the seminal works of the 1970s [2][3][4][5][6], animal contests were predominantly modelled within the framework of game theory [7][8][9][10]. Although they can generate empirically testable predictions-notably trends

| Effective Interaction Potentials
Our model is based on the mapping of typical contest behaviour to generic rules of inter-contestant interactions.
These rules are encoded by effective 'contestant interaction potentials' V j →i , which capture the influence of a rival contestant j on the motion of contestant i (Fig. 1A,B). Not to be confused with resource holding potentials (RHPs), our interaction potentials are analogous to the potential interaction energies that govern the interactions between physical particles. We construct these potentials based on the following generic features of contest behaviour, which we state in terms of effective attraction or repulsion between i and j depending on the distance between them: (1) Long-range repulsion due to mutual avoidance (which can be surmounted due to an attracting resource, as shown in of the interaction decays to zero when the contestants are far apart. Note that the tendency to decrease the intercontestant distance (effective attraction) is associated here with conflict escalation, while the tendency to increase this distance (effective repulsion) is associated with de-escalation. These effects can be directly measured in experiments, as we demonstrate in a later section.
Various interaction potentials can be constructed to satisfy the above requirements, that is to have a qualitative shape as in Fig. 1A,B. Here we propose one such particular potential, a combination of a logarithmic repulsion and an attractive Gaussian well, for which the extrema can be obtained analytically (Supporting Information S1), where x i j is the (dimensionless) distance between contestants i and j (with respective position vectors r i and r j ), α j →i and δ j →i are positive 'interaction parameters' that set the strengths of effective attraction and repulsion (experienced by i when interacting with a rival j ), β > 0 determines the range of effective attraction, and x 0 is a length scale distance parameter. Both β and x 0 are assumed to be the same for all contestants in a given system, and in this work will be set to equal 1. Supporting Information S2 addresses the addition of an intermediate 'evaluation' regime, which has been observed in various animal contests [7,17,30,37], to V j →i , demonstrating the inclusion of other (system-specific) features in this interaction potential.
Note that α j →i reflects the motivation of contestant i to escalate the interaction, and is therefore associated with the (absolute or relative) RHP of i , while δ j →i reflects how intimidating (repulsive) the rival j is perceived by i , and is therefore associated with the (absolute or relative) RHP of j . In a later section, we construct an explicit functional relationship between the parameters α j →i and δ j →i and the contestants' RHPs depending on the assessment strategy that they employ. An analogous interaction potential V i →j (with interaction parameters α i →j and δ i →j ) is experienced by the rival j due to the interaction with i and, as implied by the directional arrow notation, in generalV j →i V i →j since these potentials manifest asymmetries between the contestants (as illustrated in Fig. 1E). The influence of V j →i and V i →j on the motion of the contestants is governed by the non-reciprocal forces that they generate, F j →i = −dV j →i /d x i j and F i →j = −dV i →j /d x i j .
Access to limited resources is the primary motivation of animals to engage in contests in the first place [1]. Most of these resources, notably mates, food, and territories, are inherently spatially localized, and therefore act as attracting regions in space that drive competitors closer to each other until conflict is inevitable. The level of attraction towards a given resource is determined by the perceived resource value, which could vary not only according to an absolute scale, but also between contestants and contexts [10]. We model the influence of a localized resource on the motion of contestant i as an effective 'resource potential'V res→i . As withV j →i , V res→i should not be confused with the concept of RHP, but rather should be thought of as the effective 'energy' landscape created by the resource. The particular shape of the resource potential's landscape may be system-specific [30], but its global qualitative effect is generic: to bring contestants into contest range due to their mutual attraction to the resource. A resource potential with a simple radially-symmetrical form is shown in Fig. 1C,D. Note that the effective potential landscapes of Fig. 1A and C describe interactions in a two-dimensional (planar) space, but the model is equally applicable in three dimensions.
Once contestants become strongly engaged in a contest interaction, their attention is predominantly given to their rival until the encounter is resolved. This implies an 'attention switch' in the interactions with a resource and with rivals, where the contestants' motion is significantly affected by their attraction to the resource (i.e. by V res→i and V res→j ) only when they are relatively far apart, and is dominated by their interaction with each other (i.e. by V j →i and V i →j ) when they are within the contest range. This attention switch can be expressed by the total effective potential experienced by contestant i , V tot→i , which combines the influence of a rival j and of a resource on the motion of i , where x ∩ is the contest onset distance, as defined below and in Fig. 1F. A respective total effective potential V tot→j is experienced by the rival j due to i and the resource. Below we demonstrate how these potentials can be extracted from contest trajectories, and in ref. [30] we demonstrate their extraction in a specific system of spider contestants, where the resource potential has a non-trivial shape.

| Definition of a Contest
In order to clearly define the onset of a 'contest' in our model, we consider the relative motion between the contestants along the inter-contestant axis (Fig. 1A) due only to V j →i and V i →j . Note that according to Eq. (1), this relative motion depends only on the distance between the contestants, and is governed by the effective forces F j →i and F i →j . Taking the j → i direction as the 'positive' directionx i j = (r i − r j )/ |r i − r j |, and the position of contestant j as a fixed point of reference, contestant i appears to be driven alongx i j by a relative 'contest force' F contest , given by where note that the sum is taken since F i →j , which is applied by i on j in the −x i j direction, appears to drive i relative to j in the opposing +x i j direction. Eq. (3) motivates the definition of a relative 'contest potential' V contest as the sum of the individual interaction potentials, such that F contest = −dV contest /d x i j . We use Eqs. (3) and (4) to define the onset of a contest according to the direction of relative motion, which changes at the locations of the local maximum (x ∩ ) and minimum (x ∪ ) of V contest (see Support- ing Information S1 for the analytic expressions of these extrema). When the contestants reach a separation x i j that is shorter than x ∩ , the relative force becomes attractive (F contest < 0) towards x ∪ , and the interaction is governed by a transient bounded state (see Fig. 1F). This bounded state is equivalent to the ultimate escalation into a short-range contest, in which the contestants are completely engaged with each other. We therefore define x ∩ as the contest onset distance, and regard two contestants as engaged in a contest when x i j < x ∩ (Fig. 1F). Note that according to the particular choice of Eq. (1), the relative contest potential is given by To simulate the dynamics of our model's contestants, we treat them as Brownian particles moving in space under the influence of an external potential [38], as described in Supporting Information S3. Note that in this work, all contests were simulated in a two-dimensional (planar) space. Fig (1), with interaction parameters α j →i = 7, δ j →i = 3, and β = 1. (B) The profiles of V j →i and its corresponding force F j →i = −dV j →i /d x i j as a function of the inter-contestant distance x i j . The graph of V j →i was shifted vertically such that the lowest shown point has a 'height' of zero. Parameter values as in A. (C) The landscape of an effective 'resource potential' V res with a simple radiallysymmetrical form. Resources act as attracting regions in space that drive contestant into conflict range. (D) The profiles of V res→i and its corresponding force F res→i = −dV res→i /d r i as a function of the distance from the resource r i = |r i |. C and D show the potential V res→i (r i ) = p i ln(r i + ), where p i > 0 sets the attractiveness of the resource (as perceived by contestant i ), and > 0 prevents divergence at the resource (defined as the origin), with p i = 4 and = 1. (E) Asymmetries between contestants are manifested by their contestant interaction potentials (in general V j →i V i →j ). Here V j →i is the same as in B, and V i →j is shown with α i →j = 8, δ i →j = 4, and β = 1. (F) The relative 'contest force' F contest = F j →i + F i →j governs the relative motion along the inter-contestant axis (arrows).
This force is associated with a relative 'contest potential' V contest = V j →i + V i →j , which has its local maximum (x ∩ ) and minimum (x ∪ ) where F contest = 0 (no relative motion between the contestants). The distance x i j = x ∩ is defined as the contest onset.

| Extracting Interaction Potentials from Empirical Measurements
Using simulated contestant trajectories as in Fig. 2A, for which the underlying potentials are known, we demonstrate how the contestants' effective interaction potentials can be extracted from the spatio-temporal dynamics of contests.
These potentials govern the velocity at which the contestants tend to move with respect to one another depending on their position. With minimal a priori assumptions about the observed interactions, this relative motion can be gauged by the averaged relative velocity between the contestants as a function of where note that v rel > 0 (a tendency to increase x i j ) indicates effective repulsion between the contestants, while v rel < 0 (a tendency to decrease x i j ) indicates effective attraction. Fig. 2D shows the relative velocity profile described by v rel , as calculated from the trajectories of n = 30 simulated contests as in Fig. 2A. To be informative, v rel requires sufficient sampling, such that the stochastic components of the motion are mostly averaged out, and that the sampled contests are comparable, so that the remaining averaged dynamics represents the data well. For example, the relative velocity profile of Fig. 2D represents a fairly large but experimentally-feasible set of RHP-matched contests with the same initial setup (comparable contests).
Then, an averaged relative interaction potential can be derived from v rel by integration with respect to x i j , where the 'integral' denotes the approximate cumulative integration over the discrete values of the measured v rel (see supporting information S4 for the formal definition). Eq. (7) assumes that the effects of the contestants' inertia can be neglected on average, such that the averaged relative velocity is directly proportional (through the 'mobility' η, see Supporting Information S3) to the effective relative force associated with V rel . In practice, η can be simply absorbed into V rel by setting η = 1. Fig. 2D shows the result of this integration, and Supporting Information S4 describes the full practical implementation of Eqs. (6) and (7) to a set of contest trajectories.
Although the overall shape of the observed potential V rel is in good qualitative agreement with the actual contest potential, it includes contributions from the residual attraction of both contestants towards the resource, and therefore cannot be strictly identified withV contest . By observing the typical contest behaviour of the studied animals, one should be able to estimate the average inter-contestant distance at which the 'attention switch' of Eq. (2) comes into play, and thereby estimate the range of x i j within which the interaction is dominated by V contest and the effect of the resource is negligible. For example, a clear change of the averaged relative motion from effective repulsion to effective attraction, as indicated by a sign change of v rel , is a possible indicator for the onset of this range. In this range, a model for V contest can be fitted to V rel (supporting information S4), as illustrated in Fig. 2E. With the n = 30 simulated trajectories used here, a fit according to Eq. (5) deviates only slightly from the actual V contest .
Finally, for contests between RHP-matched contestants as in the current example, the fitted V contest can be simply divided by 2 to obtain the contestant interaction potentials V j →i and V i →j , as shown in Fig. 2F. Otherwise, a relation between the contestants' RHP and the parameters of the interaction potentials (an RHP-assessment strategy) has to be assumed in order to dissect V contest into V j →i and V i →j . To avoid such a priori assumptions about the underlying assessment strategy, we propose that the initial extraction of effective interaction potentials should always rely on contests sampled from an RHP-uniform pool of contestants, e.g. contestants of similar sizes in systems where size is strongly correlated with RHP. Once effective interaction potentials are established for these RHP-matched contestants, evidence for the assessment strategy can be gathered, based on the theory developed in the following section, by sampling contests between contestants of other RHPs.

| The Assessment Function
The type of RHP-related information used by contestants to resolve contests, commonly termed the 'RHP-assessment strategy', has been widely used to classify contests in different species [11,39]. Historically, theoretical and empirical studies have analyzed and classified animal contests according to two main categories of assessment: self-assessment, in which contestants only consider their own RHP and do not gather information about their rival's RHP [11], and mutual assessment, in which contestants consider both their own and their rival's RHP in their decision-making [11].
Existing game-theoretic models of contest behaviour were mostly constructed according to a specific assessment strategy of either the self-or mutual assessment categories, and this often limits their applicability only to systems which closely follow their underlying assessment paradigm [14].
Here we propose that any mode of assessment can be expressed in terms of how the parameters α j →i and δ j →i of Eq. (1) vary with the contestants' RHP. We assume that the RHP of contestants i and j can be sufficiently expressed by single numeric variables, which are respectively denoted m i and m j . Henceforth, we will often refer to m i and m j as the contestants' (effective) sizes, although in general RHP is not strictly interchangeable with size [5]. Nevertheless, any metric or proxy of RHP that can be numerically expressed is compatible with this approach. In order to facilitate comparisons across taxa and scales, it is useful to define such that m i and m j are dimensionless effective 'sizes' that express the RHP of the contestants relative to some chosen reference in the population of interest, e.g. the estimated average.
We construct an 'assessment function' A j →i (of contestant i with respect to a rival j ) which can express, in principle, any assessment strategy. For a two-component interaction potential as in Eq. (1), A j →i can be represented as a two-element vector that defines the functional relationship between the parameters α j →i and δ j →i and the effective size variables m i and m j . As explained above, α j →i is directly associated with the (absolute or relative) size of contestant i , while δ j →i is directly associated with the (absolute or relative) size of the rival j , and these features can be expressed by A j →i as follows, where α 0 and δ 0 are scaling parameters, and the different RHP-dependent components represent: m i s -absolute selfassessment; m j r -absolute rival-assessment; (m i /m j ) s Q and (m j /m i ) r Q -relative self-and rival-assessment (mutual assessment), respectively. Note that the opponent's assessment function, A i →j = α i →j , δ i →j , is obtained by swapping the functional roles of m i and m j in Eq. (9). The assessment strategy, which is now defined in terms of how α j →i and δ j →i vary with m i and m j , is represented by the (non-negative) values of the exponents s, r , s Q , r Q . In particular, we propose that 'pure' self-assessment can be described by s > 0 and r , s Q , r Q = 0, that is and that 'pure' mutual (relative) assessment can be described by s, r = 0 and s Q , r Q > 0, that is Importantly, any combination of these modes of assessment can be expressed by the assessment function A j →i , and this allows the description of animal contests that do not follow a pure assessment strategy [14].  10) and (11) were used with α 0 = 7 and δ 0 = 3.
Representing the attractive and repulsive components of Eq. (1) as a two-element vector V 0 , we can conveniently express V j →i as the dot product of Eqs. (9) and (12), This separation of contest behaviour into two functional components, a system-specific component that encodes the contestant's assessment strategy (A j →i ) and a more generic component that encodes the spatial properties of the contest interaction (V 0 ), is an important feature of our model.

| Accounting for Fighting Costs
The RHP is in general time-dependent, as it reflects the current state of a contestant. For example, injured or energydepleted individuals would have a decreased RHP compared to their uncompromised state. Direct costs of fighting come in two main forms: (1) self-inflicted costs (due to a contestant's own actions), and (2) costs inflicted by the rival.
The contributions of these costs to the contestants' decision-making have been previously considered as a feature of the assessment strategy [11]. In particular, pure self-assessment models assume that the actions of the rival do not inflict costs, while in mutual assessment both self-and rival-inflicted costs are integrated [11].
Here we extend the model to account for these two main costs, but note that the following approach can be used, in principle, to account for any cost. We set the total self-inflicted cost and the total rival-inflicted cost as increasing functions of the accumulated contest time t σ , and model the dependence of the effective size on these costs as where µ i is the effective size of contestant i before the contest had started, C i is the accumulated self-inflicted cost, and C j →i is the accumulated cost inflicted by the rival j . As a proof of concept, we write simple but useful expressions for C i and C j →i as where K self and K i j µ j /µ i are the rates at which their respective costs are accrued. Eq. (15) naively assumes that costs are incurred continuously and deterministically, and that the rate of incurring self-inflicted costs is independent of the contestant's own effective size. Furthermore, it assumes that the rate of incurring costs from the rival is proportional to the initial effective size ratio-such that the larger contestant inflicts costs faster but incurs them slower. Importantly, the integration of costs into the model, using Eq. (14), is not predicated on these simplifying assumptions. Combining Eqs. (14) and (15), the resulting expressions for m i and m j during the contest are While both m i and m j decrease monotonically with t σ , when µ i > µ j and K i j 0 (e.g., in an asymmetric contest with mutual assessment), the ratio m i /m j increases and approaches a constant as t σ → ∞ (Supporting Information S5).
The dynamics of m i , m j , and m i /m j according to Eq. (16) is shown with only self-inflicted costs (K i j = 0) in Fig. 4A, and with both self-inflicted and rival-inflicted costs (K i j 0) in Fig. 4B.
The dependence of the effective sizes on t σ due to costs means that the interaction potentials themselves depend on t σ through Eq. (13), as demonstrated in Fig. 4C,D. This ultimate manifestation of costs in the model has a straight-forward behavioural interpretation: the accumulation of costs affects the internal motivation of the contestants to fight and/or their perception of the opponent, and therefore alters the nature of their interaction. In pure self-assessment, self-inflicted costs lead to simultaneous reduction in the effective attraction of both contestants towards their rival, as evident by the diminishing potential wells of Fig. 4C. In mutual assessment, rival-inflicted costs increase the asymmetry of the interaction, as captured by the opposing trends of the potentials in Fig. 4D. The relative contest potential vary accordingly with t σ , as shown in Fig. 4E,F. For both cases studied here-pure self-assessment (Eq. (10) with s = 1) and pure mutual assessment (Eq. (11) with s Q = 1 and r Q = 2)-the bounding well of V contest , which defines the contest regime, becomes less attractive (shallower) as the contest proceeds. In Fig. 4E this trend eventually leads to contest termination, as the bounding well disappears and V contest becomes strictly repulsive. The dependence of m i and m j on the accumulated contest duration t σ due to costs means that the interaction potentials themselves depend on t σ . Here, the potentials V i →j and V j →i vary according to the values of m i and m j in A (C) and B (D) as t σ increases. Note that in D, the asymmetry between V i →j and V j →i increases with t σ , in accordance with the trend of m i /m j in B. (E,F) The relative contest potential vary accordingly with t σ , such that the bounding well that defines the contest regime becomes less attractive (shallower).

TRENDS OF CONTEST DURATION
The duration of contests is widely used as a readily observable and relatively unbiased measure of contest dynamics.
Many behavioural studies examine the relation between contest duration and the RHP of the contestants in order to determine whether a given species tends to settle contests through self-or mutual assessment [11,13,14]. Notably, pure self-assessment models predict that contest duration would generally increase with the mean RHP of the contestants [12], as the persistence of purely self-assessing contestants is determined by their absolute RHP. In contrast, mutual assessment models predict contest duration to strongly decrease with the contestants' RHP ratio, and that the duration of RHP-matched contests would not scale with RHP at all [12]. Here we show that the same trends can be derived and understood within our model using a physics-inspired reasoning of 'contestant particles' escaping a potential well.
When deriving these trends, we consider two limiting cases in terms of fighting costs. In the 'no-cost' limit, the costs accumulated during the course of a single contest are negligible. This means that the effective sizes m i and m j do not change during the contest, making V contest effectively independent of contest duration. Although not realistic, the no-cost limit sets a useful upper bound on contest duration. In the opposing 'cost-driven' limit, a single contest entails very significant costs, resulting in m i and m j decaying substantially during the contest, and in a corresponding dependence of V contest on contest duration-as illustrated in Fig. 3E,F. The termination of a no-cost contest is noisedriven-entirely governed by the stochastic component of the contestants' motion and the shape of V contest , while the duration of a cost-driven contest is dominated by the accrued costs, as described below.
In the context of the model, contest duration can be thought of as the time it takes for the contestants to escape the potential well of V contest once they are trapped by its transient bounded state. The effective 'contest bounding energy', U , can be obtained for any mode of assessment (Supporting Information S6) as a function of m i and m j , where note thatV contest , as well as x ∩ and x ∪ , depend on m i and m j through Eq. (9). In the no-cost case, contest dynamics are analogous to the dynamics of Brownian particles in an energy trap of constant depth U [40]. Then the mean contest duration, t c , should increase exponentially with U , where the pre-exponential factor Π is assumed to vary weakly with m i and m j -such that the exponential dictates the qualitative trend of t c , and T eff is the 'effective temperature' of the contestant particles' interaction. Eq. (18) relies on the assumption that, once within the contest range, the contestants reach the minimum of V contest quickly-within an average time that is significantly shorter than t c -and spend the rest of the contest near the minimum until they escape, as in Fig. 2B.
In the cost-driven case, the cost-dominated contest duration, denoted t cost henceforth, can be obtained by considering the decay of the effective sizes due to costs up to the point where V contest is no longer attractive, as illustrated in Fig. 4E. This happens when the two extrema of V contest merge into a single inflection point, which for our particular choice of interaction potentials satisfies the condition (Supporting Information S1) where e is Euler's number. Together with Eqs. (9) and (16), the condition of Eq. (19) can be invoked to evaluate t cost for any mode of assessment. In Supporting Information S8, we derive analytic expressions for t cost under pure selfassessment and pure mutual assessment, which are valid estimates when the costs are large enough to make t cost much smaller than the noise-driven duration t c .

Noise-driven (no-cost) Noise-driven (no-cost)
Cost-driven Since we are interested in the trends of contest duration with respect to m i and m j under a particular assessment strategy, and since absolute durations vary between species, it is useful to define relative durations as τ c = t c /t c and τ cost = t cost /t c , with t c = Π exp(U /T eff ), where Π and U correspond to a no-cost contest between two sizematched contestants of the reference effective size (m i = m j = 1, recall Eq. (8)), for which all modes of assessment described by Eq. (9) yield identical interaction potentials, and therefore the same mean contest duration t c .
We examine three trends of contest duration with respect to the initial effective sizes, µ i and µ j , for pure self-and pure mutual assessment: (1) Increasing size in size-matched contests, (2) Increasing size of the smaller contestant in asymmetric contests, and (3) Increasing size of the larger contestant in asymmetric contests, as described in Fig. 5C-F.
The theoretical trends predicted by Eqs. (17)- (19) are in agreement with the mean trends obtained from simulations, and are aligned with previously reported experimental trends and predictions of game-theoretic models [11,14]. This demonstrates that contest duration can be derived directly from the underlying physical properties of the interaction, as an emergent feature of contest dynamics. Comparison between the no-cost trends (Fig. 5C,D) and the cost-driven trends (Fig. 5E,F) shows that both cases give rise to the same qualitative trends-suggesting that explicit integration of fighting costs (which relies on a cost function that typically cannot be measured) is not necessary to explain these previously observed trends.

| Dynamics of asymmetric contests
Interactions between unmatched contestants are characterized by broken symmetry. Here we explore in the model the effects of this asymmetry on the spatio-temporal dynamics of the contest and the emergence of chase dynamicsa ubiquitous feature of animal contests. As illustrated in Fig. 6A for strongly asymmetric interaction potentials, within the 'chase' range the larger contestant is attracted by a deep minimum-leading it to move towards its smaller rival, while the smaller contestant is repelled in the same direction-moving away from its larger rival. Together, these effects gives rise to directed chase behaviour during the contest, where the larger contestant tends to chase its smaller rival away. The extent to which a contest is dominated by chase dynamics is determined by the magnitude of asymmetry between the inter-contestant effective forces, measured by In particular, since contests are governed by the forces near the minimum of V contest , the extent of chase dynamics during a contest is determined by ∆F i j (x ∪ ). Fig. 6B shows ∆F i j as a function of x i j for strongly unmatched contestants (Left) and ∆F i j (x ∪ ) as a function of the larger contestant's effective size m i (Right) under pure self-assessment (Eq. (10) with s = 1) and pure mutual assessment (Eq. (11) with s Q = 1 and r Q = 2). This comparison further illustrates that in mutual assessment, a relatively small effective size difference is translated into strong interaction asymmetry.
To quantify chase dynamics in the contestants' trajectories, we consider the direction correlation between the velocity of the contestants' midpoint-measured byv m , and the inter-contestant directionx i j , as defined in Fig. 6C (Inset). The temporal mean of this 'chase correlator', denoted by v m ·x i j , is theoretically zero for symmetric interactions, but positive for asymmetric interactions because of the directional bias imposed by the asymmetry, and approaches 1 if the interaction is dominated by the chase phase.

| Contest outcome and size-related advantage
The ultimate expression of the RHPs is the outcome of the contest, wherein the winner obtains the resource. In the model, the resource is well-defined as the global minimum of the effective resource potential, and the outcome of the contest is determined when one of the contestants reaches the resource after the contest has ended. The advantage of larger effective size can be therefore examined directly in the model. In Fig. 7, we demonstrate for pure mutual assessment (Eq. (11) with s Q = 1 and r Q = 2) how interaction asymmetry increases the winning probability of the larger contestant-further showcasing the scope of the model in the describing observable contest dynamics.
We consider 'fair start' contests (Fig. 7A), which start when the contestants reach the contest range at equivalent vantage points with respect to the resource-such that neither of them has an initial positional advantage. Any advantage at winning such contests would therefore emerge from the dynamics of the contest itself. In Fig. 7B, we examine how the distribution of the contestants' positions at the end of the contest is affected by the size asymmetry. As the size asymmetry increases, contests increasingly end with the larger contestant at positional advantage with respect to the resource ( |θ | < 90 • , see upper panel in Fig. 7B). This effect is due to increasing chase dynamics, in which the larger contestant tends to chase its rival away from the resource-leaving the larger contestant closer to the resource when the contest terminates. Fig. 7C compares the probability that the larger contestant is closer to the resource at the end of the contest with the probability that it is the winner, as a function of the size ratio. The match between these probabilities means that in the model's simulations, the positional configuration at the end of the contest determines its outcome, where the contestant closer to the resource becomes the winner.

DISCUSSION
The study of animal contests has a rich history, extending back to the first formal application of evolutionary stable strategies to explain the evolutionary logic of these agonistic interactions [2,41]. In the following decades, gametheoretic models have yielded great insights into animal contests across taxonomic boundaries and contexts [1,42].
Nevertheless, the scarcity of direct empirical evidence in support of these models highlights the limitations of gametheoretic approaches in the study of animal contests [12][13][14]. In particular, the difficulty of measuring contest dynamics as modelled within game theory has been a topic of recent discussion and debate [12,14,[20][21][22]. One inherent barrier in the correspondence between theory and experiment has been the omission of within-contest dynamics by game-theoretic models, which typically verify their underlying decision rules based on contest end-points.
In this work, we developed a new theoretical framework for animal contest dynamics based on measurable spatiotemporal characteristics of contest behaviour. The basic building blocks of our model are effective interaction potentials, which encode generic rules of inter-contestant motion through the effective interaction forces that they generate.
Importantly, these rules of motion can be directly extracted from empirical measurements of contest trajectories, and the simulated contest dynamics that our model gives rise to can be directly compared with the observable dynamics of real contests. Our approach requires few a priori assumptions about the observed interactions and is not predicated on decision rules imposed by a specific assessment strategy. Moreover, it has greater applicability to the study of contests in natural conditions because it can utilize the entire information provided by the contestants' trajectories, and does not critically rely on the ability to measure contest duration. Our approach is therefore robust to partially sampled contests, in which the observer may be unsure of the onset of the contest, where the contestants may move out of sight, or when contests are prematurely ended by an external stimulus.
Once the basic form of the effective interaction potentials has been established, our framing of assessment strategies as variations of the interaction parameters depending on the contestants' RHPs, as represented by the assessment function, allows the exploration of various strategies along the assessment continuum. This includes strategies that do not fall into the self-or mutual assessment categories, such as mixed assessment strategies [14]. Our model's representation of assessment strategies also brings them into the measurable domain where, rather than being retrospectively assigned based on the eventual contest outcome, the assessment strategy can in principle be inferred from the way the interaction varies with the contestants' RHPs. More broadly, modeling approaches that relate the measurable nature of the interaction to the current state of the contestants can be extended to encompass other determinants of behaviour, as we have demonstrated in our implementation of fighting costs.
While our model offers a new way of deriving and understanding previously described strategy-dependent trends of contest duration as a function of the contestants' RHPs, the detailed description of the contestants' spatial dynamics allows us to go far beyond paraphrasing the predictions of other models. We showcased some of these applications by exploring spatio-temporal properties of asymmetric contests, notably the emergence of chase dynamics and their contribution to size-related advantage. Such applications are especially useful to the study of complex competitive scenarios, for example systems in which the spatial density of interacting contestants is highly variable [30].
Furthermore, the ability to extract effective interaction potentials directly from contest trajectories offers a robust method for detecting changes within an interaction over time. This can be done by sampling the trajectories of the same contestants at different times-for example by dissecting the contests into their initial and terminal stages, or by separately analyzing consecutive contests among the same rivals in the same or in different conditions. Such data can be used to determine how strategies update over time or context, which has been previously discussed as a useful contribution to the understanding of assessment strategies [14]. More generally, by monitoring the detailed dynamics of contests, we can study the role that injuries, energetic expenditure, learning from past experience, or an intrinsic change in motivation play in the behavioural outputs of contestants, and thereby gain insights into the mechanisms that underlie these outputs [43]. The above suggests many further applications of our modeling approach, which we leave for future work.
With the rapid development of tools to gather extremely high-resolution data on behavioural interactions in both laboratory [44,45] and field settings [24,46], our model aims to bridge the growing gap between empirical capabilities and theory. Not only can the model recapitulate many predictions of previous models, but importantly it enables the description of realistic and detailed contest dynamics within observable time scales. Our theoretical framework should therefore facilitate new approaches and insights in the study of this widespread aspect of animal behaviour.

SUPPORTING INFORMATION
| S1. Extrema of the interaction potential The effective potential of main text Eq. (1) has the form The derivative of Eq. (S1) with respect to x is Equating Eq. (S2) to zero and rearranging, we get Eq.
(3) has the form ω exp(ω) = z , which holds only if ω = W k (z ), where W k (for k ∈ ) are branches of the Lambert W function. We get In our case, the two real branches W −1 and W 0 are the relevant solutions, and we have where x ∩ is a maximum and x ∪ is a minimum. These extrema exist if where e is Euler's number. For A/D = e/2, the two extrema merge into a single inflection point, and for A/D < e/2, the potential becomes repulsive for all x. With A = α j →i + α i →j , B = β , and D = δ j →i + δ i →j , as in main text Eq. (5), Eq. (S5) becomes which are the extrema of the contest potential of main text Eq. (5).

| S2. Inclusion of other (system-specific) features in V j →i
The effective potential of main text Eq. (1) encodes minimal generic features of contest behaviour, but in some cases it may be important to include more details in order to fit the dynamics of real contests. To demonstrate the inclusion of additional features in V j →i , we consider contests that escalate through an intermediate 'evaluation' stage that precedes the ultimate escalation into a short-range interaction, as in ref. [30]. This feature can be added to V j →i as an additional attractive Gaussian well centered at some x eval > 0, yielding a contestant interaction potential of the form where the parameters α eval j →i , β eval , and x eval define the intermediate attractive well. With an appropriate choice of parameters, Eq. (S8) encodes a two-stage escalation, as illustrated in Fig. S1.

A B
Effective potential V or force F

| S3. Simulations of contestant dynamics
In two-dimensions, the spatio-temporal dynamics of a 'contestant particle' i is governed by the following (overdamped) Langevin equation On the right-hand side of Eq. (S9), the first term accounts for the deterministic driving force felt by contestant i at position r i = (x i , y i ) due to V tot→i of main text Eq. (2), where η is the contestant's 'mobility'-which sets its response to the effective forces encoded by V tot→i . The second term is the stochastic component of the translational motion, where D is an effective diffusion coefficient, and ξ x i , ξ y i are mutually uncorrelated sources of standard Gaussian white noise for each of the spatial dimensions. In the above description, we treat our contestants as 'passive' Brownian particles by assuming that all of the deterministic activity of a contestant is sufficiently encoded into V tot→i . An 'active' component of the motion, notably directional persistence that is uncorrelated with the effective interaction forces, can be added to the dynamics of Eq. (S9) in order to match the characteristics of motion of particular animal contestants [30]. Note that the two-dimensional treatment is appropriate for contests taking place in an approximately planar environment. For contests characterized by substantial three-dimensional motion, such as aerial bird fights, Eq. (S9) can be trivially extended to three-dimensions, with r i = (x i , y i , z i ), by considering a three-dimensional version of V tot→i .
We used the two-dimensional dynamics of Eq. (S9), with η = 1 and D = 0.5, to simulate all contest interactions described in this work. Importantly, η and D were set such that simulated contestants get in and out of the contest regime (main text Fig. 1F) within a relatively short time-as in typical animal contests.
The first-order (Euler) discrete-time approximation for the time evolution of Eq. (S9) is given by where ∆t is a sufficiently small, constant time step, such that t = n∆t corresponds to the n-th step of the discrete-time sequence, and F x i = −dV tot→i /dx i . At every time step, the value of each noise source is independently drawn from a standard Gaussian distribution, where ξ x i , ξ y i ∼ N (µ = 0, σ 2 = 1). The parameter values η = 1 and D = 0.5, with a time step of ∆t = 0.005, were used in Eq. (S10) for all the simulations in this work. The simulations were implemented in MATLAB R2019b. Note that the dynamics of contestant j is governed by an equivalent equation for x j and y j .

| S4. Extracting interaction potentials from trajectories
Given trajectories of two interacting contestants, we implement main text Eq. (6) to extract a relative velocity profile by binning and averaging the relative velocity along the trajectories according to the inter-contestant distance (S11) We provide the following MATLAB R2019b code that implements Eq. (S11) to a set of contest trajectories. This code assumes that the data from each contest is stored as a MAT-file, where the contestant trajectories 'Trj1' and 'Trj2' are 2D arrays of length N frames . Plotting the output of this code yields a relative velocity profile as in main text Fig. 2D.  We proceed by implementing main text Eq. (7) to obtain an averaged relative interaction potential V rel by cumulative integration over the discrete values of v rel , using the trapezoidal rule, The following MATLAB R2019b code implements Eq. (S12) and plots the result, yielding an averaged relative interaction potential as in main text Fig. 2D. The ratio between the effective sizes m i /m j as a function of t σ is therefore given by m i m j (t σ ) = µ i µ j · 1 + K self + K i j µ i µ j t σ 1 + K self + K i j µ j µ i t σ (S14) For µ i > µ j , m i /m j increases with t σ . The ratio approaches a constant Q ∞ as t σ → ∞,

S6. Effective 'contest bounding energy'
Combining main text Eqs. (5) and (19) with Eq. (S7), and using the identity exp W (x) = x/W (x), the bounding potential well of the relative contest potential can be written as where α i j = α j →i + α i →j and δ i j = δ j →i + δ i →j . Note that U (m i , m j ) is independent of β . According to main text Eqs. In pure mutual assessment, the contest bounding energy is expected to decrease monotonically with the size ratio, and this sets some restrictions on the values of the exponents s Q and r Q . Clearly, for U to decrease with m i /m j , the repulsive component of V contest has to increase faster than its attractive component with m i /m j (that is, in Eq. (S18), δ i j has to increase faster than α i j with m i /m j ). Since α 0 > δ 0 for U to exist at all (see Eq. (S19) below), this means that r Q > s Q , but this is not strictly sufficient. Fig. S2 shows U as a function of m i /m j , with s Q = 1, α 0 = 7, and δ 0 = 3, for different values of r Q . With these parameter values, U decreases monotonically with m i /m j when r Q 1.2. Setting K i j = 0 in Eq. (S13) (no rival-inflicted costs in pure self-assessment), we have m i (t σ ) = µ i 1 + K self t σ , m j (t σ ) = µ j 1 + K self t σ (S21) Combining Eqs. (S20) and (S21), we get an expression for t cost under pure self-assessment by solving for t σ , t cost = 1 K self α 0 e δ 0 µ i s + µ j s 1/s − 1 K self for pure self-assessment.
Note that for s = 1, t cost increases linearly with the initial effective sizes.
Under pure mutual assessment, Eq. (S19) becomes In general, Eq. (S23) can be solved numerically for Q = m i /m j , yielding a size ratio, Q 0 , which satisfies Eq. (S19). Given